<!--


Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

<div id="dsChartsContainer" ng-show="deliveryService">
    <div class="ds-header">
        <ol class="breadcrumb">
            <li><a class="ds-name" ng-click="navigateToDeliveryService(deliveryService.id)" title="{{deliveryService.displayName}} ({{deliveryService.id}} | {{deliveryService.xmlId}})">{{deliveryService.displayName}}</a></li>
            <li class="active">Charts</li>
        </ol>
        <div class="more-ds-btn btn-group" uib-dropdown is-open="dsDropdown.isopen">
            <button id="moreDS-button" type="button" class="action-btn-dropdown btn" uib-dropdown-toggle>
                Change Delivery Service <i class="fa fa-angle-down fa-lg"></i>
            </button>
            <ul class="action-btn-menu uib-dropdown-menu dropdown-menu-right more-ds-menu scrollable" role="menu" aria-labelledby="moreDS-button">
                <li ng-repeat="ds in deliveryServices | orderBy:'displayName'" ng-show="ds.id != deliveryService.id"><a class="ds-name-link" title="{{ds.displayName}} ({{ds.id}} | {{ds.xmlId}})" ng-click="changeDS(ds.id)"><span ng-show="!ds.active" title="Inactive"><i class="fa fa-times fa-fw"></i></span><span ng-show="ds.active" title="Active"><i class="fa fa-check fa-fw"></i></span> {{ds.displayName}}</a></li>
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-3 col-md-12 col-sm-12 column chart-column">
            <ul class="nav nav-pills nav-stacked">
                <li class="header">Delivery Service Charts</li>
                <li ng-if="properties.charts.bandwidthPerSecond.show">
                    <a ng-class="{'selected-chart': isState('trafficPortal.private.deliveryService.view.chart.bandwidthPerSecond')}" ng-click="navigateToChart(deliveryService.id, 'bandwidth-per-second')">
                        <i ng-show="isState('trafficPortal.private.deliveryService.view.chart.bandwidthPerSecond')" class="fa fa-chevron-right fa-fw"></i> {{properties.charts.bandwidthPerSecond.name}}
                        <i class="chart-info fa fa-info-circle fa-lg" uib-popover="{{bpsPopover.content}}" popover-title="{{bpsPopover.title}}" popover-trigger="mouseenter" popover-placement="right" popover-append-to-body="true" popover-class="popover-class"></i>
                    </a>
                </li>
                <li ng-if="properties.charts.transactionsPerSecond.show">
                    <a ng-class="{'selected-chart': isState('trafficPortal.private.deliveryService.view.chart.transactionsPerSecond')}" ng-click="navigateToChart(deliveryService.id, 'transactions-per-second')">
                        <i ng-show="isState('trafficPortal.private.deliveryService.view.chart.transactionsPerSecond')" class="fa fa-chevron-right fa-fw"></i> {{properties.charts.transactionsPerSecond.name}}
                        <i class="chart-info fa fa-info-circle fa-lg" uib-popover="{{tpsPopover.content}}" popover-title="{{tpsPopover.title}}" popover-trigger="mouseenter" popover-placement="right" popover-append-to-body="true" popover-class="popover-class"></i>
                    </a>
                </li>
                <li ng-if="properties.charts.httpStatus.show">
                    <a ng-class="{'selected-chart': isState('trafficPortal.private.deliveryService.view.chart.httpStatus')}" ng-click="navigateToChart(deliveryService.id, 'http-status-by-class')">
                        <i ng-show="isState('trafficPortal.private.deliveryService.view.chart.httpStatus')" class="fa fa-chevron-right fa-fw"></i> {{properties.charts.httpStatus.name}}
                        <i class="chart-info fa fa-info-circle fa-lg" uib-popover="{{httpPopover.content}}" popover-title="{{httpPopover.title}}" popover-trigger="mouseenter" popover-placement="right" popover-append-to-body="true" popover-class="popover-class"></i>
                    </a>
                </li>
            </ul>
        </div>
        <div class="col-lg-9 col-med-12 col-sm-12">
            <div ui-view="chartDatesContent"></div>
            <div ui-view="chartContent" class="chart-content"></div>
        </div>
    </div>
</div>


